package com.ocom.payconfig.controller;

import com.ocom.common.constant.PayConfigUrl;
import com.ocom.common.request.payhandle.GetCcbDeleteBusinessRequest;
import com.ocom.common.resp.Result;
import com.ocom.payconfig.service.CcbBusinessInfoService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * ccb_business_infoController
 *
 * @author js
 * @date 2023-10-04 18:02:54
 */
@RestController
public class CcbBusinessInfoController {

        @Resource
        private CcbBusinessInfoService ccbBusinessInfoService;

        /**
         * 5.3 获取建行智慧生活商家列表
         */
        @PostMapping(PayConfigUrl.Url_GetCcbBusinessList)
        public Result getCcbBusinessList(@RequestBody GetCcbDeleteBusinessRequest request) {
//            Page<CcbBusinessInfo> page = ccbBusinessInfoService.selectCcbBusinessInfoPage(pageNumber, pageSize);
            return ccbBusinessInfoService.getCcbBusinessList(request.getComId(), request);
        }

        /**
        * 5.4 删除建行智慧生活商家信息
         */
        @PostMapping(PayConfigUrl.Url_GetCcbDeleteBusiness)
        public Result getCcbDeleteBusiness(@RequestBody GetCcbDeleteBusinessRequest request) {
            Result ret = ccbBusinessInfoService.getCcbDeleteBusiness(request.getComId(), request);
            return ret;
        }
//        @PostMapping("/getCcbDeleteBusiness_ByTest")
//        public Result updateDeviceByCcb(@RequestBody UpdateTollPointInfoRequest request){
//            return ResultUtil.success(ccbBusinessInfoService.updateDeviceByCcb(request.getCom_id(), request));
//        }

}
